package com.hyperion.blog.controller;

import com.hyperion.blog.utils.UserThreadLocal;
import com.hyperion.blog.vo.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @author Hyperion
 */
@RestController
@Slf4j
public class Ping {
    @RequestMapping("/ping")
    @ResponseBody
    public Result ping() {
        log.info(UserThreadLocal.get().toString());
        return Result.success(new Date());
    }
}
